package com.example.tag;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;
/**
 * @author 邱凯旋
 * counter用来记住审核问卷的次数
 * 通过simple tag 标签
 *
 */
public class Counter2SimpleTag extends SimpleTagSupport {

    private static int counter2 = 0;

    public void doTag() throws JspException, IOException {
        JspWriter out = getJspContext().getOut();
        out.print(this.getCounter());
        this.setCounter();
    }

    public void setCounter() {
        counter2++;
    }

    public int getCounter() {
        return counter2;
    }

}
